package trading_strategy.orders;

import trading_strategy.instruments.ListedInstrument;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: gderoujoux
 * Date: 19 mai 2010
 * Time: 18:31:37
 * To change this template use File | Settings | File Templates.
 */
public class Brokers {
    Map<ListedInstrument, InstrumentOrderBroker> brokers = new HashMap<ListedInstrument, InstrumentOrderBroker>();
    static Brokers instance = new Brokers();
    public static Brokers getInstance() {
        return instance;
    }

    public InstrumentOrderBroker getBroker(ListedInstrument instrument) {
        return brokers.get(instrument);
    }

    public void registerBroker(ListedInstrument instrument, InstrumentOrderBroker broker) {
        brokers.put(instrument, broker);
    }
}
